Caption = "Rotate center of projection into Y-Z plane"
Height = 495
Index = 2
Left = 5760
TabIndex = 9
Top = 2280
Width = 2175
WordWrap = -1 'True
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "Rotate center of projection into Z axis"
Height = 375
Index = 3
Left = 0
TabIndex = 8
Top = 5040
Width = 2175
WordWrap = -1 'True
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "Rotate UP into Y-Z plane"
Height = 255
Index = 4
Left = 2280
TabIndex = 7
Top = 5040
Width = 2175
WordWrap = -1 'True
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "Project onto X-Y plane"
Height = 255
Index = 5
Left = 4560
TabIndex = 6
Top = 5040
Width = 2175
WordWrap = -1 'True
End
Attribute VB_Name = "frmUp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private FirstCube As Integer
' Viewing parameters.
Private EyeR As Single ' Center of projection.
Private EyeTheta As Single
Private EyePhi As Single
Private Const FocusX = 0# ' Focus point.
Private Const FocusY = 0#
Private Const FocusZ = 0#
' Projection parameters.
Private UpX As Single ' Up vector.
Private UpY As Single
Private UpZ As Single
Private Cx As Single ' Center of projection.
Private Cy As Single
Private Cz As Single
Private Fx As Single ' Focus point.
Private Fy As Single
Private Fz As Single
' Matrices used for the projection.
Private M(0 To 5) As Transformation
Private Projector(1 To 4, 1 To 4) As Single
Private P(1 To 4, 1 To 4) As Single
' Create transformation matrices for perspective
' projection with:
' focus point (focx, focy, focz)
' center of projection (ex, ey, ez)
' up vector <ux, uy, uz>
Private Sub CreateMatrices(ByVal focx As Single, ByVal focy As Single, ByVal focz As Single, ByVal ex As Single, ByVal ey As Single, ByVal ez As Single, ByVal ux As Single, ByVal uy As Single, ByVal uz As Single)